<ui:composition template="/pages/faces/ui/layout/ces_template.xhtml"
	xmlns="http://www.w3.org/1999/xhtml"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:p="http://primefaces.org/ui"
	xmlns:composite="http://java.sun.com/jsf/composite">

	<ui:define name="pageTitle">
		<h:outputText value="#{msg.register_page_title}" />
	</ui:define>

	<ui:define name="pageBody">
		<h:panelGroup styleClass="accountInfo">
			<h:form>
			<p:panel header="#{msg.register_account_info_lbl}">
			<h:panelGrid columns="3">
				<h:outputText for="email" value="#{msg.register_email_lbl}" />
				<p:inputText id="email" label="#{msg.register_email_lbl}" 
					value="#{registrationBean.email}" required="true" 
					requiredMessage="#{msg.reg_email_required_msg}" validator="#{registrationBean.validateEmail}" />
				<h:message for="email" styleClass="negativeMsg" />
			  
				<h:outputText for="password" value="#{msg.register_password_lbl}" />
				<p:password id="password" label="#{msg.register_password_lbl}" 
					value="#{registrationBean.password}" feedback="true" promptLabel="#{msg.reg_enter_pass_msg}"
					weakLabel="#{msg.reg_pass_weak_lbl}" goodLabel="#{msg.reg_pass_good_lbl}"
					strongLabel="#{msg.reg_pass_strong_lbl}"
					required="true" requiredMessage="#{msg.reg_pass_required_msg}" /> 
				<h:message for="password" styleClass="negativeMsg" />
				
				<h:outputText for="confirmPassword" value="#{msg.register_confirm_password_lbl}" />
				<p:password id="confirmPassword" label="#{msg.register_confirm_password_lbl}" 
					value="#{registrationBean.confirmPassword}" feedback="true" promptLabel="#{msg.reg_enter_pass_msg}"
					weakLabel="#{msg.reg_pass_weak_lbl}" goodLabel="#{msg.reg_pass_good_lbl}"
					strongLabel="#{msg.reg_pass_strong_lbl}"
					required="true" requiredMessage="#{msg.reg_confirmpass_required_msg}" validator="#{registrationBean.validateConfirmPassword}" />
				<h:message for="confirmPassword" styleClass="negativeMsg" />
				
			</h:panelGrid>
			</p:panel>
				<h:panelGroup layout="block" styleClass="submitButton">
					<h:link value="#{msg.register_cancel_lbl}" outcome="home" />
					<p:commandButton value="#{msg.register_submit_lbl}" type="submit" action="#{registrationBean.register}" ajax="false" />
				</h:panelGroup>
			</h:form>			
		</h:panelGroup>
	</ui:define>

</ui:composition>
